#!/bin/sh

# 找到相机标记的照片，移动到新的文件夹

# src_dir=/Volumes/sony\*a/DCIM/100MSDCF
# target_dir=/Users/mojito/微云/摄影

src_dir=/Volumes/NIKON\ Z\ 6_2 
target_dir=/Users/dcyl/Desktop/锁定导出 

cd ${src_dir}

for file in ./*
do
	filelist=`ls -lO ${file}`

	OLD_IFS="$IFS"
	IFS=" "
	array=($filelist)
	IFS="$OLD_IFS"

	if [[ ${array[4]} == 'uchg' ]]; then
		cp ${file} ${target_dir}
	fi
done